// 订单API
const install = (Vue, vm) => {
	// 获取订单列表
	let totalCount = (data) => vm.$zx.post(`/api/activityCount/totalCount`, data);
	let agentActivityCount = (data) => vm.$zx.post(`/api/activityCount/agentActivityCount`, data);
	let terminalTopStat = () => vm.$zx.post(`/api/terminalInfo/terminalTopStat`);
	let terminalStatDetail = () => vm.$zx.post(`/api/terminalInfo/terminalStatDetail`);
	let terminalStatDetailByAgent = (data) => vm.$zx.post(
		`/api/terminalInfo/terminalStatDetailByAgent/${data.pageNo}/${data.pageSize}`);

	let terminalInfoList = (pageNo, pageSize, data) => vm.$zx.post(
		`/api/terminalInfo/list/${pageNo}/${pageSize}`, data);
	let terminalInfoQueryIssueList = (pageNo, pageSize, data) => vm.$zx.post(
		`/api/terminalInfo/queryIssueList/${pageNo}/${pageSize}`, data);
	let terminalInfoQueryRecoverList = (pageNo, pageSize, data) => vm.$zx.post(
		`/api/terminalInfo/queryRecoverList/${pageNo}/${pageSize}`, data);
	let terminalActivityAndFakeStat = (pageNo, pageSize, data) => vm.$zx.post(
		`/api/terminalInfo/terminalActivityAndFakeStat/${pageNo}/${pageSize}`,
		data); //未伪激活
	let queryTerminalOperRecord = (pageNo, pageSize, terminalOperType) => vm.$zx.post(
		`/api/terminalInfo/queryTerminalOperRecord/${pageNo}/${pageSize}/${terminalOperType}`); //分拨记录
	let getAgentUnderList = (pageNo, pageSize, data) => vm.$zx.post(
		`/api/agent/underList/${pageNo}/${pageSize}`,
		data); //分页查询直属业务用户（包含机构/代理商）
	let terminalSNIssue = (data) => vm.$zx.post(
		`/api/terminalInfo/snIssue`,
		data); //
	let terminalSNRecover = (data) => vm.$zx.post(
		`/api/terminalInfo/snRecover`,
		data); //
	let queryTerminalOperRecordDetail = (pageNo, pageSize, batchNo) => vm.$zx.post(
		`/api/terminalInfo/queryTerminalOperRecordDetail/${pageNo}/${pageSize}/${batchNo}`);
	vm.$zx.terminal_api = {
		totalCount,
		agentActivityCount,
		terminalTopStat,
		terminalStatDetail,
		terminalStatDetailByAgent,
		terminalInfoList,
		terminalInfoQueryIssueList,
		terminalInfoQueryRecoverList,
		terminalActivityAndFakeStat,
		queryTerminalOperRecord,
		getAgentUnderList,
		terminalSNIssue,
		terminalSNRecover,
		queryTerminalOperRecordDetail
	};
};

export default {
	install,
};